#ifndef LOCKIMAGE_H
#define LOCKIMAGE_H

#include <QObject>
#include <QMutex>
#include <QImage>
#include <QDebug>


class LockImage : public QObject
{
    Q_OBJECT
public:
    explicit LockImage(QObject *parent = 0);
    ~LockImage();

    bool loadImage(const QString &path);

    int startReadLock(QImage &img);
    void stopReadLock(int index);
signals:

public slots:

private:
    QImage mFirstImage;
    QImage mSecondImage;
    QMutex mFirstLock;
    QMutex mSecondLock;
};

#endif // LOCKIMAGE_H
